package cc.admin.modules.graduate.service.impl;

import cc.admin.modules.graduate.entity.SelectFive;
import cc.admin.modules.graduate.mapper.SelectFiveMapper;
import cc.admin.modules.graduate.service.ISelectFiveService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 8选5
 * @Author: cc-admin
 * @Date:   2025-02-20
 * @Version: V1.0.0
 */
@Service
public class SelectFiveServiceImpl extends ServiceImpl<SelectFiveMapper, SelectFive> implements ISelectFiveService {

    @Autowired
    private SelectFiveMapper selectFiveMapper;
    @Override
    public void saveSelcetFive(SelectFive selectFive) {
        String OrderNodeString = StringUtils.join(selectFive.getOrderNode(),",");
        selectFive.setOrderNodeString(OrderNodeString);
        selectFiveMapper.insert(selectFive);
    }

    @Override
    public void updateSelect(SelectFive selectFive) {
        String OrderNodeString = StringUtils.join(selectFive.getOrderNode(),",");
        selectFive.setOrderNodeString(OrderNodeString);
        selectFiveMapper.updateById(selectFive);
    }
}
